{extend name="common:base" /}
{block name="css"}
<!--pickers css-->
<link rel="stylesheet" type="text/css" href="__JS__/bootstrap-datepicker/css/datepicker-custom.css" />
<link rel="stylesheet" type="text/css" href="__JS__/bootstrap-timepicker/css/timepicker.css" />
<link rel="stylesheet" type="text/css" href="__JS__/bootstrap-colorpicker/css/colorpicker.css" />
<link rel="stylesheet" type="text/css" href="__JS__/bootstrap-daterangepicker/daterangepicker-bs3.css" />
<link rel="stylesheet" type="text/css" href="__JS__/bootstrap-datetimepicker/css/datetimepicker-custom.css" />
{/block}

{block name="main"}
<link rel="stylesheet" href="__FONT__/css/font-awesome.min.css" />

<style>
    .modal.in .modal-dialog{
        margin-top: 10%;
        z-index: 10000;
    }
    .modal-backdrop{
        z-index: 0;
    }
</style>
<!--body wrapper start-->
<div class="wrapper">
    <div class="row">
        <div class="col-md-12">
            <!--breadcrumbs start -->
            <ul class="breadcrumb panel">
                <li><a href="{:url('Index/index')}"><i class="fa fa-home"></i> 控制台</a></li>
                <li><a href="{:url('index')}">设置中心</a></li>
                <li class="active">操作记录</li>
            </ul>
            <!--breadcrumbs end -->
        </div>
    </div>

    <div class="page-body">
        <div class="row">
            <div class="col-xs-12 col-md-12">
                <div class="widget">
                    <header class="panel-heading col-xs-12 ">
                        <form class="form-inline" action="{:url('')}" method="get">
                            <div class="form-group">
                                <div class="col-md-5">
                                    <div class="input-group  custom-date-range">
                                        <input type="text" class="form-control form_datetime" value="{$_GET['from'] ?? ''}" name="from" placeholder="开始时间">
                                        <span class="input-group-addon">到</span>
                                        <input type="text" class="form-control form_datetime" value="{$_GET['to'] ?? ''}" name="to" placeholder="结束时间">
                                    </div>
                                </div>
                                <button type="submit" class="btn btn-primary"><i class="fa fa-search"></i></button>
                            </div>
                        </form>
                    </header>

                    <div class="widget-body">
                        <!--<div id="searchable_filter" class="dataTables_filter">-->
                            <!--<form action="{:url('operation/showlist')}" method="get">-->
                                <!--<div class="input-group dowebok" style=" margin-bottom:10px; width:100%;" >-->
                                    <!--<input type="text" name ="name" value="{$name|default='无'}" class="form-control pull-left" placeholder="操作人名称" style="width: 200px;">-->
                                    <!--<button class="btn btn-default shiny pull-left" type="submit">搜索</button>-->
                                <!--</div>-->
                                <!--<div class="input-group dowebok" style=" margin-bottom:10px; width:100%;" >-->
                                    <!--<label style="float: left;margin-left: 10px">操作起始时间:&nbsp;</label>-->
                                    <!--<input type="text" value="{$begin_time|default=''}" id='begin_time' name="begin_time"  placeholder="操作起始时间"  class="date-picker form-control" style="width:200px;float: left;" data-date-format="yyyy-mm-dd">-->
                                    <!--<label style="float: left;margin-left: 10px;">操作结束时间:&nbsp;</label>-->
                                    <!--<input type="text" value="{$end_time|default=''}" id='end_time' name="end_time"  placeholder="操作结束时间"  class="date-picker form-control" style="width:200px;float: left;" data-date-format="yyyy-mm-dd">-->
                                    <!--<button style="margin-left: 10px" class="btn btn-default shiny pull-left" type="submit">搜索</button>-->
                                    <!--<div class="switch style_button" style="position: absolute;top:0;right:0;margin-top: 0px">
                                        <button type="button" onclick="put_excel()" class="btn btn-default" type="button" style="float: right; margin-right:10px;"><i class="fa fa-inbox"></i>导出Excel</button>
                                    </div>-->
                                <!--</div>-->
                            <!--</form>-->
                            <!--<form action="{:url('operation/del')}" method="get">-->
                                <!--<div class="input-group dowebok" style=" margin-bottom:10px; width:100%;" >-->
                                    <!--<label style="float: left;margin-left: 10px">操作起始时间:&nbsp;</label>-->
                                    <!--<input type="text" value="{$d_begin_time|default=''}" name="d_begin_time"  placeholder="操作起始时间"  class="date-picker form-control" style="width:200px;float: left;" data-date-format="yyyy-mm-dd">-->
                                    <!--<label style="float: left;margin-left: 10px;">操作结束时间:&nbsp;</label>-->
                                    <!--<input type="text" value="{$d_end_time|default=''}" name="d_end_time"  placeholder="操作结束时间"  class="date-picker form-control" style="width:200px;float: left;" data-date-format="yyyy-mm-dd">-->
                                    <!--<button style="margin-left: 10px" class="btn btn-danger shiny pull-left" type="submit"><i class="fa fa-trash-o"></i>批量删除</button>-->
                                    <!--<div class="switch style_button" style="position: absolute;top:0;right:0;margin-top: 0px">
                                        <button type="button" onclick="put_excel()" class="btn btn-default" type="button" style="float: right; margin-right:10px;"><i class="fa fa-inbox"></i>导出Excel</button>
                                    </div>-->
                                <!--</div>-->
                            <!--</form>-->
                        <!--</div>-->
                        <table class="table table-striped table-bordered table-hover" id="expandabledatatable">
                            <thead>
                            <tr>
                                <th>编号</th>
                                <th>操作人</th>
                                <th>操作方式</th>
                                <th>操作名称</th>
                                <th>操作地址</th>
                                <th>操作人Ip信息</th>
                                <th>操作时间</th>
                                <!--<th width="8%">操作</th>-->
                            </tr>
                            </thead>

                            <tbody>
                            {present name="log_list"}
                            {foreach $log_list as $k => $v}
                            <tr>
                                <td>{$v.id}</td>
                                <td>{$v.username}</td>
                                <td>{$v.operation_node}</td>
                                <td>{$v.do_name}</td>
                                {if $v.operation_addr }
                                <td>{$v.operation_addr}</td>
                                {else/}
                                <td> <a href="{:url('get_addr',array('ip'=>$v['operation_ip']))}"  title="获取操作地址">获取操作地址</a></td>
                                {/if}
                                <td>{$v.operation_ip}</td>
                                <td>{$v.operation_time}</td>

                            </tr>
                            {/foreach}
                            {/present}
                            </tbody>
                        </table>
                        <!--</form>-->
                        <div class="row DTTTFooter table-toolbar">
                            <div class="col-sm-6">
                                <div class="dataTables_paginate paging_bootstrap" id="simpledatatable_paginate">
                                    <ul class="pagination">
                                        {$page}
                                    </ul></div></div></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!--body wrapper end-->
{/block}
{block name="js"}
<!--pickers plugins-->
<script type="text/javascript" src="__JS__/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script type="text/javascript" src="__JS__/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script>
<script type="text/javascript" src="__JS__/bootstrap-daterangepicker/moment.min.js"></script>
<script type="text/javascript" src="__JS__/bootstrap-daterangepicker/daterangepicker.js"></script>
<script type="text/javascript" src="__JS__/bootstrap-colorpicker/js/bootstrap-colorpicker.js"></script>
<script type="text/javascript" src="__JS__/bootstrap-timepicker/js/bootstrap-timepicker.js"></script>

<!--pickers initialization-->
<script src="__JS__/pickers-init.js"></script>
{/block}
